import Cookies from "js-cookie";

const TokenKey = "stuAuthorization";

export function getToken() {
  return Cookies.get(TokenKey);
}

export function localstorageGetToken() {
  return localStorage.getItem(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token, {
    expires: 3,
    path: "/",
  });
}

export function localstorageSetToken(token) {
  return localStorage.setItem(TokenKey,token)
}

export function removeToken() {
  return Cookies.remove(TokenKey, {
    path: "/",
  });
}

export function localstorageRemoveToken() {
  return localStorage.removeItem(TokenKey);
}
